home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Video Toaster 4.3
/
Video Toaster v4.3.iso
/
4.2
/
arexx
/
cg
/
rexxlauncher.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1998-04-16
|
1KB
|
56 lines
/* RexxLauncher.rexx -- Launches CG Scripts */
/* By Bob Caron © 1994 NewTek, Inc. */
/* This one just took HOURS to code */
call remlib(CG_AREXX)
call addlib(CG_AREXX,0)
filnam = 'ENV:RLauncher.state'
version = 'RexxLauncher v1.4'
if (exists(filnam)) then do
if (~open(state, filnam, 'R')) then break
if (readln(state) ~= version) then break
file=readln(state)
end
call close state
if file~="" | file="FILE" then do
if lastpos('/',file,length(file)-1)~=0 then do
filenam=right(file,(length(file)-lastpos('/',file,length(file)-1)))
path=left(file,(lastpos('/',file,length(file))-1))
end
else do
filenam=right(file,(length(file)-lastpos(':',file,length(file)-1)))
path=left(file,(lastpos(':',file,length(file))))
end
end
if file="FILE" | file="" then do
path="Rexx:CG"
filenam=""
end
script=REQ_FILE("Run Arexx Program",filenam,path)
file=script
if (open(state, filnam, 'W')) then do
call writeln state, version
call writeln state, file
call close state
end
if exists(script)=0 then do
call REQ_TELL("Macro not found.")
call remlib(CG_AREXX)
exit
end
call remlib(CG_AREXX)
cmd='rx '||script||''
address command cmd
exit